package com.kehongborui.fliggy.task;

import com.kehongborui.fliggy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author zhang peng yang ming
 * @CopyRight (C) http://www.csdn.com
 * @brief
 * @email 122162005@qq.com
 * @date 2018-09-12
 */
@Component
public class ResetUserAttemptsTask {
    @Autowired
    UserService userService;

    @Scheduled(cron = "0 59 23 * * ?")
    public void reset() {
        userService.resetAttempts();
    }
}
